
from flask import current_app
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager


from info import create_app,db


app = create_app()

# 使用管理类来Manager管理app
manager = Manager(app)

Migrate(app=app,db=db)

manager.add_command('db',MigrateCommand)

@app.route('/')
def index():

    current_app.logger.debug('debug')
    current_app.logger.error('error')

    return 'index'

if __name__ == '__main__':
    app.run()
    # manager.run()